<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The textPath purpose</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="cairocontext.textextents.html">CairoContext::textExtents</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="cairocontext.transform.html">CairoContext::transform</a></div>
 <div class="up"><a href="class.cairocontext.html">CairoContext</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="cairocontext.textpath" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">CairoContext::textPath</h1>
  <h1 class="refname">cairo_text_path</h1>
  <p class="verinfo">(PECL cairo &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">CairoContext::textPath</span> -- <span class="refname">cairo_text_path</span> &mdash; <span class="dc-title">The textPath purpose</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-cairocontext.textpath-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格</p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>CairoContext::textPath</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$string</code></span>
   )</div>

  <p class="para rdfs-comment">过程化风格</p>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>cairo_text_path</strong></span>
    ( <span class="methodparam"><span class="type"><a href="class.cairocontext.html" class="type CairoContext">CairoContext</a></span> <code class="parameter">$context</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$text</code></span>
   )</div>

  <p class="para rdfs-comment">
   Adds closed paths for text to the current path. The generated path, if filled,
   achieves an effect similar to that of <span class="methodname"><a href="cairocontext.showtext.html" class="methodname">CairoContext::showText()</a></span>.
  </p>
  <p class="para">
   Text conversion and positioning is done similar to 
   <span class="methodname"><a href="cairocontext.showtext.html" class="methodname">CairoContext::showText()</a></span>.
  </p>
  <p class="para">
   Like <span class="methodname"><a href="cairocontext.showtext.html" class="methodname">CairoContext::showText()</a></span>, 
   after this call the current point is moved to the origin of where 
   the next glyph would be placed in this same progression. 
   That is, the current point will be at the origin of the final 
   glyph offset by its advance values. This allows for chaining multiple 
   calls to <span class="methodname"><a href="cairocontext.showtext.html" class="methodname">CairoContext::showText()</a></span>
   without having to set current point in between.
  </p>
  <p class="para">
   Note: The <span class="methodname"><strong>CairoContext::textPath()</strong></span> function
   call is part of what the cairo designers call the &quot;toy&quot; text API. 
   It is convenient for short demos and simple programs, 
   but it is not expected to be adequate for serious text-using applications. 
   See <span class="methodname"><a href="cairocontext.glyphpath.html" class="methodname">CairoContext::glyphPath()</a></span> for the &quot;real&quot; 
   text path API in cairo.
  </p>
  
 </div>

 
 <div class="refsect1 parameters" id="refsect1-cairocontext.textpath-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">context</code></em></dt>

     <dd>

      <p class="para">
       A <a href="class.cairocontext.html" class="classname">CairoContext</a> object
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">text</code></em></dt>

     <dd>

      <p class="para">
       Description...
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">string</code></em></dt>

     <dd>

      <p class="para">
       Description...
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-cairocontext.textpath-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Description...
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-cairocontext.textpath-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2960">
    <p><strong>Example #1 面向对象风格</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">/*&nbsp;...&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
...
</pre></div>
    </div>
   </div>
  </p>
  <p class="para">
   <div class="example" id="example-2961">
    <p><strong>Example #2 过程化风格</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">/*&nbsp;...&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
...
</pre></div>
    </div>
   </div>
  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-cairocontext.textpath-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><strong>Classname::Method()</strong></span></li>
   </ul>
  </p>
 </div>

 
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="cairocontext.textextents.html">CairoContext::textExtents</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="cairocontext.transform.html">CairoContext::transform</a></div>
 <div class="up"><a href="class.cairocontext.html">CairoContext</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
